package cn.itrip.beans.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 酒店表
 * @TableName itrip_hotel
 */
@TableName(value ="itrip_hotel")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ItripHotel implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 酒店名称
     */
    private String hotelname;

    /**
     * 所在国家id
     */
    private Long countryid;

    /**
     * 所在省份id
     */
    private Long provinceid;

    /**
     * 所在城市id
     */
    private Long cityid;

    /**
     * 酒店所在地址
     */
    private String address;

    /**
     * 酒店介绍（保存附文本）
     */
    private String details;

    /**
     * 酒店设施
     */
    private String facilities;

    /**
     * 酒店政策
     */
    private String hotelpolicy;

    /**
     * 酒店类型(1:国内酒店 2:国际酒店)
     */
    private Integer hoteltype;

    /**
     * (1:经济酒店  2:二星级酒店  3:三星级 4:四星酒店 5星酒店)
     */
    private Integer hotellevel;

    /**
     * 是否是团购酒店
     */
    private Integer isgrouppurchase;

    /**
     * 城市名称 冗余字段
     */
    private String redundantcityname;

    /**
     * 省名称 冗余字段
     */
    private String redundantprovincename;

    /**
     * 国家名称 冗余字段
     */
    private String redundantcountryname;

    /**
     * 酒店库存（冗余，每天开定时任务的时候更新）
     */
    private Integer redundanthotelstore;

    /**
     * 
     */
    private Date creationdate;

    /**
     * 
     */
    private Long createdby;

    /**
     * 
     */
    private Date modifydate;

    /**
     * 
     */
    private Long modifiedby;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ItripHotel other = (ItripHotel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getHotelname() == null ? other.getHotelname() == null : this.getHotelname().equals(other.getHotelname()))
            && (this.getCountryid() == null ? other.getCountryid() == null : this.getCountryid().equals(other.getCountryid()))
            && (this.getProvinceid() == null ? other.getProvinceid() == null : this.getProvinceid().equals(other.getProvinceid()))
            && (this.getCityid() == null ? other.getCityid() == null : this.getCityid().equals(other.getCityid()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getDetails() == null ? other.getDetails() == null : this.getDetails().equals(other.getDetails()))
            && (this.getFacilities() == null ? other.getFacilities() == null : this.getFacilities().equals(other.getFacilities()))
            && (this.getHotelpolicy() == null ? other.getHotelpolicy() == null : this.getHotelpolicy().equals(other.getHotelpolicy()))
            && (this.getHoteltype() == null ? other.getHoteltype() == null : this.getHoteltype().equals(other.getHoteltype()))
            && (this.getHotellevel() == null ? other.getHotellevel() == null : this.getHotellevel().equals(other.getHotellevel()))
            && (this.getIsgrouppurchase() == null ? other.getIsgrouppurchase() == null : this.getIsgrouppurchase().equals(other.getIsgrouppurchase()))
            && (this.getRedundantcityname() == null ? other.getRedundantcityname() == null : this.getRedundantcityname().equals(other.getRedundantcityname()))
            && (this.getRedundantprovincename() == null ? other.getRedundantprovincename() == null : this.getRedundantprovincename().equals(other.getRedundantprovincename()))
            && (this.getRedundantcountryname() == null ? other.getRedundantcountryname() == null : this.getRedundantcountryname().equals(other.getRedundantcountryname()))
            && (this.getRedundanthotelstore() == null ? other.getRedundanthotelstore() == null : this.getRedundanthotelstore().equals(other.getRedundanthotelstore()))
            && (this.getCreationdate() == null ? other.getCreationdate() == null : this.getCreationdate().equals(other.getCreationdate()))
            && (this.getCreatedby() == null ? other.getCreatedby() == null : this.getCreatedby().equals(other.getCreatedby()))
            && (this.getModifydate() == null ? other.getModifydate() == null : this.getModifydate().equals(other.getModifydate()))
            && (this.getModifiedby() == null ? other.getModifiedby() == null : this.getModifiedby().equals(other.getModifiedby()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getHotelname() == null) ? 0 : getHotelname().hashCode());
        result = prime * result + ((getCountryid() == null) ? 0 : getCountryid().hashCode());
        result = prime * result + ((getProvinceid() == null) ? 0 : getProvinceid().hashCode());
        result = prime * result + ((getCityid() == null) ? 0 : getCityid().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getDetails() == null) ? 0 : getDetails().hashCode());
        result = prime * result + ((getFacilities() == null) ? 0 : getFacilities().hashCode());
        result = prime * result + ((getHotelpolicy() == null) ? 0 : getHotelpolicy().hashCode());
        result = prime * result + ((getHoteltype() == null) ? 0 : getHoteltype().hashCode());
        result = prime * result + ((getHotellevel() == null) ? 0 : getHotellevel().hashCode());
        result = prime * result + ((getIsgrouppurchase() == null) ? 0 : getIsgrouppurchase().hashCode());
        result = prime * result + ((getRedundantcityname() == null) ? 0 : getRedundantcityname().hashCode());
        result = prime * result + ((getRedundantprovincename() == null) ? 0 : getRedundantprovincename().hashCode());
        result = prime * result + ((getRedundantcountryname() == null) ? 0 : getRedundantcountryname().hashCode());
        result = prime * result + ((getRedundanthotelstore() == null) ? 0 : getRedundanthotelstore().hashCode());
        result = prime * result + ((getCreationdate() == null) ? 0 : getCreationdate().hashCode());
        result = prime * result + ((getCreatedby() == null) ? 0 : getCreatedby().hashCode());
        result = prime * result + ((getModifydate() == null) ? 0 : getModifydate().hashCode());
        result = prime * result + ((getModifiedby() == null) ? 0 : getModifiedby().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", hotelname=").append(hotelname);
        sb.append(", countryid=").append(countryid);
        sb.append(", provinceid=").append(provinceid);
        sb.append(", cityid=").append(cityid);
        sb.append(", address=").append(address);
        sb.append(", details=").append(details);
        sb.append(", facilities=").append(facilities);
        sb.append(", hotelpolicy=").append(hotelpolicy);
        sb.append(", hoteltype=").append(hoteltype);
        sb.append(", hotellevel=").append(hotellevel);
        sb.append(", isgrouppurchase=").append(isgrouppurchase);
        sb.append(", redundantcityname=").append(redundantcityname);
        sb.append(", redundantprovincename=").append(redundantprovincename);
        sb.append(", redundantcountryname=").append(redundantcountryname);
        sb.append(", redundanthotelstore=").append(redundanthotelstore);
        sb.append(", creationdate=").append(creationdate);
        sb.append(", createdby=").append(createdby);
        sb.append(", modifydate=").append(modifydate);
        sb.append(", modifiedby=").append(modifiedby);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}